package com.labichaoka.chaoka.utils;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

/**
 * 发送广播
 * Created by Administrator on 2016/9/24.
 */

public class SendBroadCastUtil {
    private Context context;

    public SendBroadCastUtil(Context context) {
        this.context = context;
    }

    public void sendBroad(String command, Bundle bundle) {
        Intent intent = new Intent();
        intent.setAction(command);
        if (null != bundle) {
            intent.putExtras(bundle);
        }
        context.sendBroadcast(intent);
    }
}
